﻿using BCEntity.OA.Workflow.WorkflowActivity;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace BCData.OA.Workflow.WorkflowActivity
{
    /// <summary>
    /// OA工作流活动
    /// </summary>
    public interface IWorkflowActivityData
    {

        #region 检查工作流活动是否存在
        /// <summary>
        /// 检查工作流活动是否存在
        /// </summary>
        /// <param name="workflowKey">工作流Key</param>
        /// <returns></returns>
        Task<bool> CheckExists(string workflowKey);
        #endregion

        #region 获取工作流活动配置
        /// <summary>
        /// 获取工作流活动信息
        /// </summary>
        /// <param name="workflowKey">工作流Key</param>
        /// <returns></returns>
        Task<WorkflowActivityEntity> GetEntity(string workflowKey);
        /// <summary>
        /// 获取工作流活动信息
        /// </summary>
        /// <param name="workflowActivityId">工作流活动Id</param>
        /// <returns></returns>
        Task<WorkflowActivityEntity> GetEntity(long workflowActivityId);
        #endregion

        #region 获取工作流活动配置列表
        /// <summary>
        /// 获取工作流活动配置列表
        /// </summary>
        /// <param name="workflowCategoryId">工作流分类Id</param>
        /// <param name="workflowName">工作流名称</param>
        /// <param name="isBaseWorkflow">是否为基本工作流</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">每页数据条数</param>
        /// <returns></returns>
        Task<(IEnumerable<WorkflowActivityEntity>, int)> Query(long? workflowCategoryId, string workflowName, bool? isBaseWorkflow, int pageIndex, int pageSize);
        #endregion

        #region 根据工作流类型获取配置信息
        /// <summary>
        /// 根据工作流类型获取配置信息
        /// </summary>
        /// <param name="workflowType">工作流类型</param>
        /// <returns></returns>
        Task<WorkflowActivityEntity> GetByWorkflowTypeAsync(string workflowType);
        #endregion
    }
}
